﻿@using hc.epm.Common;
@using hc.Plat.Common.Extend;
@using hc.epm.ViewModel;
@model TzConDrawingView

@{
    ViewBag.Title = "图纸会审详情";
    if (Model==null)
    {
        return;
    }
}

<link href="~/Resource/css/ProjectManagement.css" rel="stylesheet" />

<style>
    .btn-pro {
        width: 15%;
        height: 35px;
        border: none;
        background-color: #6a6969;
        color: #fff;
    }

    .timeGroup {
        width: 100%;
        display: inline-block;
        position: relative;
    }

        .timeGroup > i {
            position: absolute;
            top: 9px;
            right: 6px;
        }
</style>

<div class="contentData">
    <form class="form-horizontal" id="mainForm">
        <div class="module-div">
            <h4>项目基本信息</h4>
            <table class="datalist" style="word-break:break-all;word-wrap:break-word;margin-top:10px;">
                <tbody>
                    <tr>
                        <td class="table_title">项目名称：</td>
                        <td class="td-div" colspan="3">
                            <div>@Model.TzConDrawing.ProjectName</div>
                        </td>
                    </tr>
                    <tr>
                        <td class="table_title">站库名称：</td>
                        <td class="td-div">
                            <div class="StationName">@Model.TzConDrawing.StationName</div>
                        </td>
                        <td class="table_title">项目性质：</td>
                        <td class="td-div">
                            <div class="NatureName">@Model.TzConDrawing.NatureName</div>
                        </td>
                    </tr>
                    <tr>
                        <td class="table_title">项目类型：</td>
                        <td class="td-div">
                            <div class="ProjectType">@Model.TzProjectApproval.ProjectType</div>
                        </td>
                        <td class="table_title">项目编号：</td>
                        <td class="td-div">
                            <div class="ProjectCode">@Model.TzConDrawing.ProjectCode</div>
                        </td>
                    </tr>
                    <tr>
                        <td class="table_title">地区公司：</td>
                        <td class="td-div">
                            <div class="RegionCompany">@Model.TzProjectApproval.RegionCompany</div>
                        </td>
                        <td class="table_title">地市公司：</td>
                        <td class="td-div">
                            <div class="CompanyName">@Model.TzConDrawing.CompanyName</div>
                        </td>
                    </tr>
                    <tr>
                        <td class="table_title">估算投资：</td>
                        <td class="td-div">
                            <div class="PredictMoney">@Model.PredictMoney.ToString("0.00") 万元</div>
                        </td>
                        <td class="table_title">工程费用：</td>
                        <td class="td-div">
                            <div class="EngineeringCost">@Model.TzProjectApproval.EngineeringCost</div>
                        </td>
                    </tr>
                    <tr>
                        <td class="table_title">土地费用：</td>
                        <td class="td-div">
                            <div class="LandCosts">@Model.TzProjectApproval.LandCosts</div>
                        </td>
                        <td class="table_title">其他费用：</td>
                        <td class="td-div">
                            <div class="OtherExpenses">@Model.TzProjectApproval.OtherExpenses</div>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div class="module-div">
            <h4>加油站施工图会审</h4>
            <table class="datalist" style="word-break:break-all;word-wrap:break-word;margin-top:10px;">
                <tbody>
                    <tr>
                        <td class="table_title">
                            <span><i class="color_red">*</i>评审时间：</span>
                        </td>
                        <td class="td-div">
                            <div class="timeGroup">
                                @(Convert.ToDateTime(Model.TzConDrawing.ReviewTime).ToString("yyyy-MM-dd"))
                            </div>
                        </td>
                        <td class="table_title">
                            <span>主持人：</span>
                        </td>
                        <td class="td-div">
                            <div class="form-group">@Model.TzConDrawing.Moderator</div>
                        </td>
                    </tr>

                    <tr>
                        <td class="table_title">
                            <span>评审地点：</span>
                        </td>
                        <td class="td-div" colspan="3">
                            <div class="form-group">
                                @Model.TzConDrawing.ReviewAddress
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td class="table_title">
                            <span>特邀专家：</span>
                        </td>
                        <td class="td-div" colspan="3">
                            <div class="form-group">
                                @Model.TzConDrawing.ReviewExperts
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td class="table_title">
                            <span>参会人员：</span>
                        </td>
                        <td class="td-div" colspan="3">
                            <div class="form-group">
                                @Model.TzConDrawing.Participants
                            </div>
                        </td>
                    </tr>

                    <tr>
                        <td class="table_title">
                            <span>评审结论：</span>
                        </td>
                        <td class="td-div" colspan="3">
                            @if (Model.TzConDrawing.Conclusion == "XMPSJL1")
                            {
                                <div>同意</div>
                            }
                            @if (Model.TzConDrawing.Conclusion == "XMPSJL2")
                            {
                                <div>原则同意</div>
                            }
                            @if (Model.TzConDrawing.Conclusion == "XMPSJL3")
                            {
                                <div>不同意</div>
                            }
                        </td>
                    </tr>

                </tbody>
            </table>
        </div>

        <div class="module-div">
            <h4>附件信息</h4>
            <table class="datalist fileShow" style="word-break:break-all;word-wrap:break-word;margin-top:10px;">
                <tbody class="fileShow-append">                    
                    <tr class="headtr">
                        <th class="table_title" style="width: 219px;">序号</th>
                        <th class="td-div">附件名称</th>
                        <th class="table_title">附件类型</th>
                        <th class="td-div">操作</th>
                    </tr>
                    @if (Model.TzConDrawing.TzAttachs != null && Model.TzConDrawing.TzAttachs.Count() > 0)
                    {
                        foreach (var item in Model.TzConDrawing.TzAttachs)
                        {

                            <tr id="${obj.GuidId}">
                                <td><span class="font-black">@item.Sort</span></td>
                                <td class="text_lf td-div"><span class="font-black">@item.Name</span></td>
                                <td><span class="font-black">@item.TypeName</span></td>
                                <td class="td-div" style="text-align:center">
                                    <a class="fileDel downloadFile" href="javascript:void(0)" data-url="@item.FilePath" data-name="@item.Name" style="color:#337ab7;">下载</a>                    
                                </td>
                            </tr>
                        }
                    }
                </tbody>
            </table>

        </div>

        <div class="layui-form-item  btn-save" style="margin-top:60px;text-align:center;">
            <input type="button" id="Cancel" value="返&nbsp;&nbsp;&nbsp;回" class="layui-btn layui-btn-big " />
        </div>
    </form>
</div>

<script>
    //返回按钮
    $("#Cancel").on("click", function () {
        window.location.href = "/TzConDrawing/Index";
    });
    //下载附件
    $("body").on("click", ".downloadFile", function () {
        var path = $(this).data("url");
        var fileName = $(this).data("name");
        window.location.href = "/Download/DownLoadHB?path=" + path + "&fileName=" + fileName;
    });
</script>
